package dao

import (
	"time"
)

// 这是 SysBaseMenu 的全局公开dao对象
var SysBaseMenuDao = sysBaseMenuDao{}

// 这是 sys_base_menu表 的实体类
type SysBaseMenu struct {
	Id          int       `json:"id" form:"id" binding:"id"`
	CreatedAt   time.Time `json:"created_at" form:"created_at" binding:"created_at"`
	UpdatedAt   time.Time `json:"updated_at" form:"updated_at" binding:"updated_at"`
	DeletedAt   time.Time `json:"deleted_at" form:"deleted_at" binding:"deleted_at"`
	MenuLevel   int       `json:"menu_level" form:"menu_level" binding:"menu_level"`
	ParentId    string    `json:"parent_id" form:"parent_id" binding:"parent_id"`          // 父菜单ID
	Path        string    `json:"path" form:"path" binding:"path"`                         // 路由path
	Name        string    `json:"name" form:"name" binding:"name"`                         // 路由name
	Hidden      int       `json:"hidden" form:"hidden" binding:"hidden"`                   // 是否在列表隐藏
	Component   string    `json:"component" form:"component" binding:"component"`          // 对应前端文件路径
	Sort        int       `json:"sort" form:"sort" binding:"sort"`                         // 排序标记
	KeepAlive   int       `json:"keep_alive" form:"keep_alive" binding:"keep_alive"`       // 附加属性
	DefaultMenu int       `json:"default_menu" form:"default_menu" binding:"default_menu"` // 附加属性
	Title       string    `json:"title" form:"title" binding:"title"`                      // 附加属性
	Icon        string    `json:"icon" form:"icon" binding:"icon"`                         // 附加属性
	CloseTab    int       `json:"close_tab" form:"close_tab" binding:"close_tab"`          // 附加属性

}

// 注意:这是 SysBaseMenu 的私有dao对象
type sysBaseMenuDao struct {
	Obj    SysBaseMenu
	Insert func(arg SysBaseMenu) int         //插入一条记录
	Update func(arg SysBaseMenu) int         //更新一条记录
	Delete func(arg SysBaseMenu) int         //删除一条记录
	Select func(arg SysBaseMenu) SysBaseMenu //获取一条记录
}
